home *** CD-ROM | disk | FTP | other *** search
Text File | 1996-05-21 | 2.8 KB | 76 lines | [TEXT/ttxt] |
- --<<<-
- --*******************************************************************************
- --* Demo for: HolidayCard
- --* Required files: reqFiles/animate.sx
- --* media.sxl
- --* holiday.sx
- --* Author: Su Quek - Kaleida Labs, Inc.
- --* Artwork: Kathleen Pierce
- --*-----------------------------------------------------------------------------*
- --* Description: This script demonstrates how to animate an object by moving
- --* it across the screen or flipping its bitmaps.
- --* The tickle method of the GroupPresenter is used to move the
- --* object across the screen and the Animation class handles
- --* the bitmap flipping.
- --* When you run "holiday.sxt", you should see a window
- --* with a snowy background scene and 4 penguins pulling a
- --* K-man on a sleigh with a banner flying across the screen.
- --* Note that each penguin is 'flapping' at different rates.
- --* To replay the 'flyby', you have re-open "holiday.sxt".
- --*******************************************************************************
-
- module HolidayModule
- uses ScriptX
- end
-
- in module HolidayModule
-
- --*=============================================================================*
- --* Set up DirReps
- --*=============================================================================*
- global demoDir := theScriptDir
- global reqFilesDir := spawn theScriptDir "reqfiles"
- global mediaDir := spawn theScriptDir "media"
-
- --*=============================================================================*
- --* Load required files
- --*=============================================================================*
- -- Load Animation
- fileIn reqFilesDir name:"animate.sx"
-
- -- Load HolidayCard
- fileIn demoDir name:"holiday.sx"
-
- --*=============================================================================*
- --* Create a title container
- --*=============================================================================*
- object tc (TitleContainer)
- dir : theScriptDir
- path : "holiday.sxt"
- name : "Happy Holidays"
- end
-
- --*=============================================================================*
- --* Create demo
- --*=============================================================================*
- object demo (HolidayCard)
- title:tc
- end
-
- --*=============================================================================*
- --* Undefine global DirReps
- --*=============================================================================*
- demoDir := undefined
- reqFilesDir := undefined
- mediaDir := undefined
-
- --*=============================================================================*
- --* Store module in the title container
- --*=============================================================================*
- append tc (getModule @HolidayModule)
- tc.startUpAction := (tc -> load tc[1]
- show demo
- start demo)
- close tc
- -->>>
-